package cn.taobaoke.restful.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 用户(宝妈)与微信群的关联表。
 * 用户表和微信群是多对多关系。
 * @author yangzuo
 * @since 2017-03-20
 */
@Setter
@Getter
@ToString
@Table(name = "tb_user_group_relation")
@Entity
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler", "fieldHandler"})
@JsonInclude(JsonInclude.Include.NON_NULL)
public class UserGroupRelation implements Serializable {

    @Id
    @GeneratedValue
    private Long id;

    @Column
    private Long userId;

    @Column
    private Long groupId;

    @Column
    private Long domainId;
}
